import simplejson, csv


f = open('ConditionCodes.csv')

reader = csv.reader(f)
h = reader.next()

results = []

for l in reader:
    r = dict(zip(h, l))
    results.append({'code': r['ConditionCode'], 'description': r['Description']})


print simplejson.dumps({'data': results})

f.close()
